<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box2{
            width:200px;
            height:200px;
            background: rgb(236, 176, 176);
        }
    </style>
</head>
<body>
    <div id="box">
        <input type="text" v-model="msg">
        {{msg}}
        <button @click="change">
            {{ isShow?'消失':'显示' }}
        </button>
        <div class="box2" v-show="isShow"></div>
    </div>
    <script src="vue.js"></script>
    <script>
        let vm = new Vue({
           el:"#box",
           data:{
               msg:"hello vue",
               isShow:true
           },
           methods:{
               change(){
                this.isShow = !this.isShow;
               }
           }
        })
    </script>
</body>
</html>